
class Animal:
    food="粮食"
    def __init__(self,name):
        self.name="小猫"
    def eat(self):
        print("{}在吃{}".format(self.name,self.food))
cat=Animal("小猫")
cat.eat()
print(cat.food)